.TH std::allocator::max_size 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::allocator::max_size \- std::allocator::max_size

.SH Synopsis
   size_type max_size() const throw();   \fI(until C++11)\fP
                                         \fI(since C++11)\fP
   size_type max_size() const noexcept;  (deprecated in C++17)
                                         (removed in C++20)

   Returns the maximum theoretically possible value of n, for which the call
   allocate(n, 0) could succeed.

   In most implementations, this returns std::numeric_limits<size_type>::max() /
   sizeof(value_type).

.SH Parameters

   \fI(none)\fP

.SH Return value

   The maximum supported allocation size.

.SH See also

   max_size returns the maximum object size supported by the allocator
   \fB[static]\fP \fI(public static member function of std::allocator_traits<Alloc>)\fP
